<template>
  <div class="fillcontain">
    <head-top></head-top>
    <div class="table_container">
      <el-table :data="tableData" style="width: 100%">
        <el-table-column label="用户名" prop="name"> </el-table-column>
        <el-table-column label="姓名" prop="nickname"> </el-table-column>
        <el-table-column label="签到时间" prop="signtime"> </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import headTop from "../components/headTop";
import { getSignDetail } from "@/api/getData";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    this.getResturants();
  },
  components: {
    headTop,
  },
  methods: {
    async getResturants() {
      let res = await getSignDetail();
      let {code,msg,data}=res.data
      if (code == 200) {
        this.tableData = [];
        data.map((item) => {
          let tableData = {};
          tableData.name = item.username;
          tableData.nickname = item.nickname;
          tableData.signtime=item.signtime
          this.tableData.push(tableData);
        });
      } else {
        this.$message({
          type: "error",
          message: msg,
        });
      }
    },
  
  },
};
</script>

<style lang="less">
@import "../style/mixin";
.el-dialog__body {
  > div {
    margin: 20px 0;
  }
}
.buttonBox {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}
.demo-table-expand {
  font-size: 0;
}
.demo-table-expand label {
  width: 90px;
  color: #99a9bf;
}
.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
}
.table_container {
  padding: 20px;
}
.Pagination {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}
.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.avatar-uploader .el-upload:hover {
  border-color: #20a0ff;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 120px;
  height: 120px;
  line-height: 120px;
  text-align: center;
}
.avatar {
  width: 120px;
  height: 120px;
  display: block;
}
</style>
